<template>
  <a-modal
      v-model:visible="visible"
      title="登录"
      :footer="null"
      @cancel="handleCancel"
  >
    <!-- 登录表单内容 -->
    <!-- ... -->
  </a-modal>
</template>

<script>
import { ref } from 'vue';
import { UserOutlined, LockOutlined } from '@ant-design/icons-vue';

export default {
  components: {
    UserOutlined,
    LockOutlined,
  },
  props: {
    modelValue: {
      type: Boolean,
      default: false,
    },
  },
  emits: ['update:modelValue', 'cancel', 'finish'],
  setup(props, { emit }) {
    const visible = ref(props.modelValue);

    const handleCancel = () => {
      visible.value = false;
      emit('update:modelValue', false);
      emit('cancel');
    };

    // 其他逻辑，如onFinish等

    return {
      visible,
      handleCancel,
      // 其他需要暴露的方法
    };
  },
};
</script>
